﻿#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"

int main()
{
	// 创建第一个日志文件
	auto file_logger1 = spdlog::basic_logger_mt("file_logger1", "logs/logfile1.txt");
	file_logger1->info("This is the first log file");

	// 创建第二个日志文件
	auto file_logger2 = spdlog::basic_logger_mt("file_logger2", "logs/logfile2.txt");
	file_logger2->info("This is the second log file");

	// 创建第三个日志文件
	auto file_logger3 = spdlog::basic_logger_mt("file_logger3", "logs/logfile3.txt");
	file_logger3->info("This is the third log file");

	//多线程安全
	auto sinkLog = spdlog::sinks::basic_file_sink_mt("file_logger3", "logs/logfile3.txt");
	
	return 0;

}